RoQ
RoQ is the format that the game (Quake3 and derivatives, including OpenArena) supports for video playback. This is about cinematics, they are a different thing than demos. RoQ videos are rarely used. However they can be shown in the menus (think about the intro video and the tier presentations of Q3A) or even inside the maps. For players: related variables and commands * /r_inGameVideo * /s_musicvolume * /s_ambient * /cinematic - Command to manually play a roq file. Example: /cinematic idlogo.roq For mappers and mod authors: how-to Here's an "How to create RoQ video and place it in a map" guide created starting from one written by ZaRR. Other tutorials are linked in the External links section. Tools: * XmediaRecode https://www.xmedia-recode.de/en/index.html * FFmpeg https://ffmpeg.zeranoe.com/builds/ (VirtualDub not needed, but if you are good on it then try) Must be 256*256 to be played correctly in-level by vanilla Q3/OA. If the RoQ has to be used inside menus instead of inside a map, it should be safe up to 512*512. Input videos MUST BE 30 FRAMES PER SECOND. If you want to play your video back in a id Tech 3 engine game, then input video dimensions MUST BE POWERS OF TWO. This means 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, or 32768. Audio may be 11025 Hz, 22050 Hz, or 44100 Hz, any number of bits, BUT IT WILL BE ENCODED AS 22050 HZ 16-BIT REGARDLESS OF WHAT YOU DO, so it is a good idea to make your input audio those settings. And of course if you use ROQ video in-level for Q3/OA then you should leave only video, because sound won't play in-level. Sound should be played back correctly in menus, instead. 1. With XmediaRecode convert, for example, into mpeg without video and set 30 fps and 256x256 resolution. 2. Make a shortcut of FFmpeg.exe, right mouse button click on it, select proportions and add this: -i inputname.mpeg -r 30 -s 256x256 outputname.roq You can also use -an to remove audio. Inside the pk3, cinematics go under "video" folder (e.g. /video/idlogo.roq or /video/mymap/myvideo.roq). 3. Create a shader including a "videomap" stage to load the roq file. Add its .shader file to your shaderlist.txt. An example of videoshader for Q3 can be seen in ZaRR's map roycovideo: http://ws.q3df.org/map/roycovideo/, here it is: textures/roycovideo/roycovideo { { videomap video/roycovideo/royco_cup_a_soup.roq rgbGen identity } } 4. In NetRadiant (or the editor of your choice), create a brush and assign the shader you created to the face of the brush which will show the video. Assign a classic texture or shader to the other faces of the brush (e.g. bricks texture, wood texture, common/caulk if they are not visible to players...). 5. If you want to also play sound: in NetRadiant use music/sound on a brush instead of creating target_speaker since the last one getting desynced if map restarts. Also good to know that if player does not look at video in-level then the video will be pause until player look back to it. So, the audio will end up desynced anyway. Additional tips * A simple way to have a RoQ video launch when starting your own mod is to provide players a .bat file containing a command similar to ..\openarena.exe +set fs_game flagraiders2 +cinematic idlogo.roqThe initial "..\" is assuming the .bat file is placed inside the mod folder. The same may be obtained without the "..\" at the beginning of the line, but adding a previous line containing "cd .." instead. (if you want to test it with FlagRaiders mod, which includes a short roq file). Of course, .bat files work under Windows... under Linux you would use a .sh script instead. ** Of course, that requires the player to launch your mod using such scripts. If you are programming your own mod, you may be able to modify its code to automatically play a video when you wish, instead. External links * RoQ on MultimediaWiki * RoQ on ModWiki * How to create a RoQ file on Moddb * Creating a RoQ video on jkhub.com See also * Mapping manual/Creating dynamic features Notes Category:Mapping Category:Manual Category:Mapping manual Category:Development